// const { injectBabelPlugin } = require('react-app-rewired');
// module.exports = function override(config, env) {
//     config = injectBabelPlugin(
//         ['import', { libraryName: 'antd-mobile', libraryDirectory: 'es', style: 'css' }],
//         config,
//     );
//     return config;
// };
const { override, fixBabelImports, addWebpackAlias } = require('customize-cra');

const path = require('path')
function pathResolve(pathUrl) {
    return path.join(__dirname, pathUrl)
}
module.exports = override(
    fixBabelImports('import', {
        libraryName: 'antd-mobile',
        style: 'css',
    }),
    addWebpackAlias({
        '@': pathResolve('./src'),
        'assets': pathResolve('./src/assets'),
        'components': pathResolve('./src/components'),
        'utils': pathResolve('./src/utils'),
        'pages': pathResolve('./src/pages'),
        'store': pathResolve('./src/store'),
    })
);